package com.fintech.datagroud.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fintech.datagroud.dao.code.EdcAgingInfoMapper;
import com.fintech.datagroud.entity.code.EdcAgingInfo;
import com.fintech.datagroud.service.DgThirdCodeInfoService;

@Service("dgThirdCodeInfoService")
public class DgThirdCodeInfoServiceImpl implements DgThirdCodeInfoService {

	@Autowired
	private EdcAgingInfoMapper edcAgingInfoMapper;
	/**
	 * 得到第三方接口的时效信息
	 * 
	 * @param code
	 * @return
	 */
	@Override
	public String getThirdInformation(String code) {
		String information = "";
		try {
			EdcAgingInfo eai = edcAgingInfoMapper.getThirdInformation(code);
			System.out.println(eai);
			if (eai != null) {
				information = eai.getValidity();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return information;
	}

}
